﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Rejestracja.aspx.cs" Inherits="DentistOffice.Rejestracja" %>



<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

    
    <link type="text/css" href="Styles/jquery-ui-1.8.12.custom.css" rel="Stylesheet" />
    <script type="text/javascript" src="Scripts/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="Scripts/jquery-ui-1.8.12.custom.min.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
   
    <br/><br/>
    <div class="infoLabel">
        <asp:Label ID="infoLabel" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>
    </div>
    <br/>

    <form method="post" action="Rejestracja.aspx">
        <div id="Person" class="divRegLeft">
            <%--Imie--%>
            <asp:Label ID="NameLabel" runat="server" Text="Imię"></asp:Label><br />
            <asp:TextBox ID="NameTextBox" runat="server"></asp:TextBox>*
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
            ControlToValidate="NameTextBox" 
            ErrorMessage="Pole wymagane."
            ForeColor="Red"
            Display="Dynamic"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
            ControlToValidate = "NameTextBox"
            ErrorMessage="Zacznij wielką literą."
            ForeColor = "Red"
            ValidationExpression="[A-Z][a-z]*"
            Display="Dynamic"></asp:RegularExpressionValidator> 
            <br />

            <%--Nazwisko--%>
            <asp:Label ID="SurnameLabel" runat="server" Text="Nazwisko"></asp:Label><br />
            <asp:TextBox ID="SurnameTextBox" runat="server"></asp:TextBox>*
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
            ControlToValidate="SurnameTextBox" 
            ErrorMessage="Pole wymagane."
            ForeColor="Red"
            Display="Dynamic"></asp:RequiredFieldValidator>
            
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
            ControlToValidate = "SurnameTextBox"
            ErrorMessage="Zacznij wielką literą."
            ForeColor = "Red"
            ValidationExpression="[A-Z][a-z]*"
            Display="Dynamic"></asp:RegularExpressionValidator> 
            <br />
            <%--Telefon--%>
            <asp:Label ID="PhoneLabel" runat="server" Text="Telefon"></asp:Label><br />
            <asp:TextBox ID="PhoneTextBox" runat="server"></asp:TextBox>*
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
            ControlToValidate="PhoneTextBox" 
            ErrorMessage="Pole wymagane."
            ForeColor="Red"
            Display="Dynamic"></asp:RequiredFieldValidator>

            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
            ControlToValidate = "PhoneTextBox"
            ErrorMessage="Podaj prawidłowy numer."
            ForeColor = "Red"
            ValidationExpression="[0-9]{9}"
            Display="Dynamic"></asp:RegularExpressionValidator> 
            <br />
            <%--email--%>
            <asp:Label ID="EmailLabel" runat="server" Text="Email"></asp:Label><br />
            <asp:TextBox ID="EmailTextBox" runat="server"></asp:TextBox>*
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
            ControlToValidate="EmailTextBox" 
            ErrorMessage="Pole wymagane."
            ForeColor="Red"
            Display="Dynamic"></asp:RequiredFieldValidator>
            
            <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
            ControlToValidate = "EmailTextBox"
            ErrorMessage="Podaj prawidłowy email."
            ForeColor = "Red"
            ValidationExpression="^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{1,})*\.([a-zA-Z]{2,}){1}$"
            Display="Dynamic"></asp:RegularExpressionValidator> 
            <br />
            <%--Login--%>
            <asp:Label ID="LoginLabel" runat="server" Text="Login"></asp:Label><br />
            <asp:TextBox ID="LoginTextBox" runat="server"></asp:TextBox>*
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
            ControlToValidate="LoginTextBox" 
            ErrorMessage="Pole wymagane."
            ForeColor="Red"
            Display="Dynamic"></asp:RequiredFieldValidator><br />
            <%--Password--%>
            <asp:Label ID="PasswordLabel" runat="server" Text="Hasło"></asp:Label><br />
            <asp:TextBox ID="PasswordTextBox" runat="server" TextMode="Password"></asp:TextBox>*
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
            ControlToValidate="PasswordTextBox" 
            ErrorMessage="Pole wymagane."
            ForeColor="Red"
            Display="Dynamic"></asp:RequiredFieldValidator>            
            <br />
            <%--AgainPassword--%>
            <asp:Label ID="AgainPasswordLabel" runat="server" Text="Powtórz Hasło"></asp:Label><br />
            <asp:TextBox ID="AgainPasswordTextBox" runat="server" TextMode="Password"></asp:TextBox>*
            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server"
            ControlToValidate="AgainPasswordTextBox" 
            ErrorMessage="Pole wymagane."
            ForeColor="Red"
            Display="Dynamic"></asp:RequiredFieldValidator>

            <asp:CompareValidator ID="CompareValidator1" runat="server"
             ErrorMessage="Hasła się nie zgadzają."
             ControlToValidate = "AgainPasswordTextBox"
             ControlToCompare = "PasswordTextBox"
             Type="String"
             ForeColor="Red"
             Operator="Equal"></asp:CompareValidator><br />
            <%--Dentist--%>
            <asp:Label ID="DentistLabel" runat="server" Text="Wybierz Dentystę"></asp:Label><br />
            <asp:DropDownList ID="DentistDropDownList" runat="server">
            </asp:DropDownList>
        </div>        
        <div id ="Company" >        
             <%--NIP--%>
            <asp:Label ID="NIPLabel" runat="server" Text="NIP Firmy"></asp:Label><br />
            <asp:TextBox ID="NIPTextBox" runat="server"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" 
            ControlToValidate = "NIPTextBox"
            ForeColor ="Red"
            ErrorMessage="Podaj wyłącznie cyfry" Display="Dynamic"></asp:RegularExpressionValidator><br />
             <%--CompanyName--%>
            <asp:Label ID="CompanyNameLabe" runat="server" Text="Nazwa Firmy"></asp:Label><br />
            <asp:TextBox ID="CompanyNameTextBox" runat="server"></asp:TextBox><br />
             <%--City--%>
            <asp:Label ID="CityLabel" runat="server" Text="Miasto"></asp:Label><br />
            <asp:TextBox ID="CityTextBox" runat="server"></asp:TextBox><br />
             <%--CityCode--%>
            <asp:Label ID="CityCodeLabel" runat="server" Text="Kod Miasta"></asp:Label><br />
            <asp:TextBox ID="CityCodeTextBox" runat="server"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server"
            ControlToValidate = "CityCodeTextBox"
            ValidationExpression="[0-9]{5}"
            ForeColor="Red"
            ErrorMessage="Podaj wyłącznie cyfry" Display="Dynamic"></asp:RegularExpressionValidator><br />

             <%--Street--%>
            <asp:Label ID="StreetLabel" runat="server" Text="Ulica"></asp:Label><br />
            <asp:TextBox ID="StreetTextBox" runat="server"></asp:TextBox><br />     
        </div>
        <br /><br /><br /><br /><br /><br /><br /><br />
        <div class="infoLabel">
        <asp:Button ID="Button2" runat="server" Text="Zarejestruj" CausesValidation="True" 
            onclick="Button2_Click" />
        </div>
  
    </form>
     
   
</asp:Content>
